import { axios } from '@/utils/request'

const api = {
  getList: '/saas/salesman',
  add: '/saas/salesman-add',
  del: '/saas/salesman-del',
  changeStatus: '/saas/salesman-status',
  renewRecord: '/salesman/list',
  orderLog: '/salesman/order-log',
}

export default api

export function getList(parameter) {
  return axios({
    url: api.getList,
    method: 'get',
    params: parameter,
  })
}

export function salesmanDel(parameter) {
  return axios({
    url: api.del,
    method: 'post',
    data: parameter,
  })
}

export function salesmanAdd(parameter) {
  return axios({
    url: api.add,
    method: 'post',
    data: parameter,
  })
}

export function changeStatus(parameter) {
  return axios({
    url: api.changeStatus,
    method: 'post',
    data: parameter,
  })
}

export function renewRecord(parameter) {
  return axios({
    url: api.renewRecord,
    method: 'get',
    params: parameter,
  })
}

export function orderLog(params) {
  return axios({
    url: api.orderLog,
    method: 'get',
    params,
  })
}
